package com.sinosoft.tcmemr.manager;

import java.util.Date;
import java.util.List;

import com.sinosoft.tcmemr.entity.DiagnoseEntity;
import com.sinosoft.tcmemr.entity.PatientCaseEntity;
import org.springframework.stereotype.Component;

@Component
public interface PatientCaseManager {
	/**
     * 增加病历记录
     * @param record
     * @return
     */
    public boolean insertSelective(PatientCaseEntity patientcase);
    
    /**
     * 增加病历
     * @param patientcase 病历信息
     * @param doctorID  医生ID
     * @param diagnoseList  诊断列表
     * @return  true/false
     */
    public boolean addPatientCase(PatientCaseEntity patientcase,
    		Integer doctorID,String drName,List<DiagnoseEntity> diagnoseList);
    
    /**
     * 查看病历信息
     * @param id
     * @return
     */
    public PatientCaseEntity selectByPrimaryKey(Integer id);
    
    /**
     * 查看病历信息
     * @param patientid
     * @return
     */
    public List<PatientCaseEntity> selectByPatientID(Integer patientid);
    
    /**
     * 更新病历信息
     * @param patientcase
     * @return
     */
    public boolean updateByPrimaryKeySelective(PatientCaseEntity patientcase);
    
    
    /**
     * 查询该病人看同一个医生 当天的病历
     * @param patientid
     * @param drName
     * @param clinicdate
     * @return
     */
    public PatientCaseEntity selectByToday(Integer patientid, String drName,Date clinicdate );
    
    /**
     * 获取该病人可修改的病历
     * @param patientid 病人ID
     * @param doctorID 医生ID
     * @return PatientCaseEntity
     */
    public PatientCaseEntity getWritePatientCase(Integer patientid, Integer doctorID );
    
    
    
}
